/**
 * 
 */
package lvtu.opencv.frontier;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;

import lvtu.opencv.bean.Pic;

/**
 * @author tao.zhang
 */
public class Frontier {

	private static ConcurrentLinkedQueue<Pic> urlQueue = new ConcurrentLinkedQueue<Pic>();

	public static Pic take() {
		return urlQueue.poll();
	}

	public static boolean isEmpty() {
		return urlQueue.isEmpty();
	}

	public static void put(List<Pic> tourUrls) {
		urlQueue.addAll(tourUrls);
	}
	
	public static void put(Pic pic) {
		urlQueue.add(pic);
	}
	
	public static void clear() {
		urlQueue.clear();
	}

	public static int size() {
		return urlQueue.size();
	}

}
